<%@page import="java.sql.ResultSet"%>
<%@page import="database.DBConnector"%>
<%
            DBConnector dbc = DBConnector.getDBC();
            if (request.getParameter("req") != null) {
                String[] makes = request.getParameterValues("req");

                for (int i = 0; i < makes.length; i++) {
                    String make = makes[i];
                    ResultSet rs = dbc.doQuery("SELECT DISTINCT ModelID FROM Cars WHERE MakeID='" + make + "';");
                    out.println("<SELECT id=\"model\" multiple=\"true\">");
                    while (rs.next()) {
                        out.println("<option>" + rs.getString(1) + "</option>");
                    }
                    out.println("</SELECT>");
                }
            }


%>